/**
 * VUEshop
 * ============================================================================
 * * 版权所有 2015-2027 深圳搜豹网络科技有限公司，并保留所有权利。
 * 网站地址: http://www.vueshop.com.cn
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和使用 .
 * 不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
 * $Author: soubao-java 2020-07-22 $
 */<template>
 <div>
     <div>
      <div class="fixed-bar">
          <div class="item-title"><router-link class="back" :to="{name:'rush',params:{currentPage:$route.params.currentPage}}" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></router-link>
              <div class="subject">
                  <h3>促销管理 - 编辑抢购</h3>
                  <h5>网站系统抢购活动详情页</h5>
              </div>
          </div>
      </div>
      <form class="form-horizontal" id="handleposition" method="post">
          <input type="hidden" id="goods_id" name="goods_id" value="">
          <input type="hidden" name="id" value="">
          <input type="hidden" name="item_id" value="">
          <div class="ncap-form-default">
              <dl class="row">
                  <dt class="tit">
                      <label><em>*</em>抢购标题</label>
                  </dt>
                  <dd class="opt">
                      <input type="text" name="title" id="title" value="" class="input-txt">
                      <span class="err" id="err_title"></span>
                      <p class="notic">请填写抢购标题</p>
                  </dd>
              </dl>
              <dl class="row">
                  <dt class="tit">
                      <label><em>*</em>选择抢购商品</label>
                  </dt>
                  <dd class="opt">
                      <input type="text" id="goods_name" readonly="" name="goods_name" value="" class="input-txt">
                      <div style="overflow: hidden" id="selected_group_goods">
                                              </div>
                      <span class="err" id="err_goods_name"></span>
                      <p class="notic">
                          <a @click="outerVisible = true" class="ncap-btn" id="select_goods_button"><i class="fa fa-search"></i>选择商品</a>
                      </p>
                  </dd>
              </dl>
              <dl class="row">
                  <dt class="tit">
                      <label><em>*</em>限时抢购价格</label>
                  </dt>
                  <dd class="opt">
                      <input type="text" id="price" name="price" value="" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" class="input-txt">
                      <span class="err" id="err_price"></span>
                      <p class="notic">商品抢购价格,单位：元</p>
                  </dd>
              </dl>
              <dl class="row">
                  <dt class="tit">
                      <label><em>*</em>参加抢购数量</label>
                  </dt>
                  <dd class="opt">
                      <input type="text" name="goods_num" id="goods_num" value="" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" class="input-txt">
                      <span class="err" id="err_goods_num"></span>
                      <p class="notic">此抢购活动最多允许抢购的商品数量</p>
                  </dd>
              </dl>
              <dl class="row">
                  <dt class="tit">
                      <label><em>*</em>限购数量</label>
                  </dt>
                  <dd class="opt">
                      <input type="text" id="buy_limit" name="buy_limit" value="" onpaste="this.value=this.value.replace(/[^\d.]/g,'')" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" class="input-txt">
                      <span class="err" id="err_buy_limit"></span>
                      <p class="notic">限时抢购每个人能购买的数量</p>
                  </dd>
              </dl>
              <dl class="row">
                  <dt class="tit">
                      <label><em>*</em>开始时间</label>
                  </dt>
                  <dd class="opt">
                      <input type="text" id="start_time" name="start_time" value="2019-11-07" class="input-txt" lay-key="1">
                      <select name="start_time_h" id="start_time_h">
                                                      <option value="0" selected="">0:00:00</option>
                                                      <option value="2">2:00:00</option>
                                                      <option value="4">4:00:00</option>
                                                      <option value="6">6:00:00</option>
                                                      <option value="8">8:00:00</option>
                                                      <option value="10">10:00:00</option>
                                                      <option value="12">12:00:00</option>
                                                      <option value="14">14:00:00</option>
                                                      <option value="16">16:00:00</option>
                                                      <option value="18">18:00:00</option>
                                                      <option value="20">20:00:00</option>
                                                      <option value="22">22:00:00</option>
                                              </select>
                      <span class="err" id="err_start_time"></span>
                      <p class="notic">抢购开始时间</p>
                      <p class="hint" style="color:red"><strong>重要:抢购时间是从凌晨0:00:00秒开始, 每隔2小时一个节点, 所以活动时间必须是两小时之内才有效, (例如今天是2017年1月1日下午2点场,<br>那活动开始和结束时间必须是:2017-01-01 14:00:01 ~ 2017-01-01 15:59:59 时间范围内), 否则前端无法显示活动信息</strong></p>
                  </dd>
              </dl>
              <dl class="row">
                  <dt class="tit">
                      <label>抢购介绍</label>
                  </dt>
                  <dd class="opt">
                      <textarea placeholder="请输入活动介绍" name="description" rows="6" class="tarea"></textarea>
                      <p class="notic">抢购描述介绍</p>
                  </dd>
              </dl>



              
              <dl class="row" txt="发布活动时，进行通知">
                  <dt class="tit">站内信通知</dt>
                  <dd class="opt">
                      <div class="onoff">
                          <label for="mmt_message_switch1" class="cb-enable selected">是</label>
                          <label for="mmt_message_switch0" class="cb-disable ">否</label>
                          <input id="mmt_message_switch1" name="mmt_message_switch" checked="checked" value="1" type="radio">
                          <input id="mmt_message_switch0" name="mmt_message_switch" value="0" type="radio">
                      </div>
                      <p class="notic"></p>
                  </dd>
              </dl>
              <!-- <dl class="row">
                  <dt class="tit">手机短信通知</dt>
                  <dd class="opt">
                      <div class="onoff">
                          <label for="mmt_short_switch1" class="cb-enable ">是</label>
                          <label for="mmt_short_switch0" class="cb-disable selected">否</label>
                          <input id="mmt_short_switch1" name="mmt_short_switch"  value="1" type="radio">
                          <input id="mmt_short_switch0" name="mmt_short_switch" checked="checked" value="0" type="radio">
                      </div>
                      <p class="notic"></p>
                  </dd>
              </dl>
              <dl class="row">
                  <dt class="tit">邮件通知</dt>
                  <dd class="opt">
                      <div class="onoff">
                          <label for="mmt_mail_switch1" class="cb-enable ">是</label>
                          <label for="mmt_mail_switch0" class="cb-disable selected">否</label>
                          <input id="mmt_mail_switch1" name="mmt_mail_switch"  value="1" type="radio">
                          <input id="mmt_mail_switch0" name="mmt_mail_switch" checked="checked" value="0" type="radio">
                      </div>
                      <p class="notic"></p>
                  </dd>
              </dl> --> 

                  <div class="bot"><a onclick="verifyForm()" class="ncap-btn-big ncap-btn-green">确认提交</a></div>
                      </div>
      </form>
     </div>
     <el-dialog title="选择商品" width="1000px" :modal = false :visible.sync="outerVisible">
      
      <!-- <div slot="footer" class="dialog-footer">
        <el-button @click="outerVisible = false">取 消</el-button>
        <el-button type="primary" @click="innerVisible = true">打开内层 Dialog</el-button>
      </div> -->
    </el-dialog>
 </div>
</template>

<script>
 import mixins from '@/mixins/inside.js'
 export default {
   mixins:[mixins],  //混入判断是否传参  是否需要返回上一页
   data () {
     return {
       outerVisible:false
     }
   },
   created(){
       console.log(this.$route.params)
   },
   mounted(){
     if (window.performance.navigation.type == 1) {
        console.log("页面被刷新")
      }else{
        console.log("首次被加载")
      }
   },
   components: {

   }
 }
</script>

<style scoped>

 
</style>
